// ❤ 渲染底部路由按钮 
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';

export class RouterLink extends Component {
  render() {
      const { routeConfig } = this.props;
    return (
      <div>
          {
              routeConfig.length?
              routeConfig.map( (item,index) => {
                  return <NavLink 
                  key={index}
                  to={item.path}
                  >
                      {item.title}
                  </NavLink>
              }):"暂无路由"
          }
      </div>
    )
  }
}

export default RouterLink